package com.hzqy.persistence.dao.wchat;


import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.WchatOrderVo;
import com.hzqy.web.vo.WchatTvPlayHistoryVo;
import com.hzqy.web.vo.WchatTvUserVo;

@Repository
public class WchatTvUserWeixinDao extends PersistenceDao<WchatOrderVo, Integer>{

	protected final Logger LOG = LoggerFactory.getLogger(WchatTvUserWeixinDao.class);
	public WchatTvUserVo selectUserInfo(String openId){
		return getSqlSession().selectOne(this.getNamespace() + "selectUserInfo", openId);
	}	
	public int insertUserInfo(WchatTvUserVo wechatTvUserVo){
		return getSqlSession().insert(this.getNamespace() + "insertUserInfo", wechatTvUserVo);
	}
	public int updateUnBundling(WchatTvUserVo wechatTvUserVo){
		return getSqlSession().update(this.getNamespace() + "updateUnBundling", wechatTvUserVo);
	}
	public List<WchatTvUserVo> selectTVWchatUserList(String serverId){
		return getSqlSession().selectList(this.getNamespace() + "selectTVWchatUserList",serverId);
	}
	public int unTVBundling(WchatTvUserVo wchatTvUserVo){
		return getSqlSession().update(this.getNamespace() + "unTVBundling",wchatTvUserVo);
	}
	public List<WchatTvPlayHistoryVo> selectUserPlayTime(WchatTvPlayHistoryVo wtph) {
		return getSqlSession().selectList(this.getNamespace()+"selectUserPlayTime", wtph);
	}
	public int insertUserPlayTime(WchatTvPlayHistoryVo wtphv) {
		return getSqlSession().insert(this.getNamespace()+"insertUserPlayTime",wtphv);
	}
	public int updateUserPlayTime(WchatTvPlayHistoryVo wtphv) {
		return getSqlSession().update(this.getNamespace()+"updateUserPlayTime",wtphv);
	}
}
